<?php
namespace Model;

use Zend\Db\Adapter\Adapter;
use Zend\Db\Sql\Predicate\Like;
use Zend\Db\Sql\Predicate\Operator;
use Zend\Db\Sql\Select;
use Zend\InputFilter\InputFilter;

class DistrictTable extends AbstractTable
{

    /**
     * @param $id
     * @return District
     */
    public function getDistrict($id){
       return $this->getById($id);
    }

    /**
     * @return InputFilter
     */
    public function getInputFilter()
    {
        $filter = new InputFilter();

        return $filter;
    }

    public function getAllByProvince($provinceId)
    {
        $select = $this->getDbSqlSelect();
        $select->where(array('province_id'=>$provinceId));
        return $this->executeSelectForArray($select);
    }

}